<!--#INCLUDE FILE="conn.asp"-->
<!-- #include file="aFunction_charCode.asp" -->
<!-- #include file="ad_comSub.asp" -->

<%
Call tslt_useridentity12_error_end()

dim communityid
communityid=request("communityid")
if communityid<>"" then
       communityid=cint(communityid)
end if
%>
<html>
<head>
<title></title>
<link href=../style/<%=session("tslt_stylefolder")%>/admin.css rel="stylesheet" type="text/css">
               <SCRIPT for=communitysort event=onblur language=javaScript>
                       if( isNaN(document.updatefrm.communitysort.value)) {
                             alert("ݱ֣");
                             document.updatefrm.communitysort.value="";
                             document.updatefrm.communitysort.focus();
                             return false;
                       }
               </SCRIPT>
</head>
<body bgcolor=#aaaac4>
<center>
<br>
<table><tr><td class="font2"></td></tr></table>
<br>
<table width="70%" border="0" cellpadding="0" cellspacing="0">
       <tr>
               <td align="left" valign="middle" bgcolor="#f7f6f6">
                         <img src="../images/tushan2.gif" align="middle" width=100 height=50>
                         <font size=2><b><a class=a1 href="community_manage.asp"></a>&nbsp;>>&nbsp;޸</b></font>
               </td>
       </tr> 
</table>

<table border="0" cellspacing="0" cellpadding="0"> 
      <form name="updatefrm" action="community_modify.asp" method="post">
<%
      dim rs
      dim sql
      sql="select * from community where id="&communityid
      set rs=conn.execute(sql)
           if not rs.eof then
%>
                  <input type="hidden" name="isok" value="yes"> 
                  <input type="hidden" name="communityid" value="<%=rs("id")%>">
                  <br>
                  <tr>
                         <td colspan=2 align="center">
                                   <font size=4 face=""><%=rs("CommunityName")%></font>
                          </td>
                   </tr>
                   <tr> <td width="140" align="right">֣</td><td><input type="text" name="communityname" value="<%=rs("CommunityName")%>"></td></tr> 
                   <tr> <td wdith="140" align="right">ݣ</td><td><input type="text" size="3" maxlength="3" name="communitysort" value="<%=rs("CommunitySort")%>"></td></tr> 
                   <tr> <td width="140" align="right">أ</td><td><input type="checkbox" name="communitychk" <%if rs("CommunityHidden")=true then%>checked<%end if%>></td></tr> 
                   <tr> 
                          <td></td>
                          <td align="left">
                                   <input type="submit" name="submitbtn" value=" ޸ ">   
                                   <input type="button" name="backbtn" value=" ȡ " onClick="location.href='community_manage.asp';"> 
                           </td>
                    </tr>
<%
            end if
      rs.close
      set rs=nothing
%>
      </form>
</table>

</center>
</body>
</html>

<%
dim isok
isok=request.form("isok")
if isok="yes" then
        Myupdate communityid
end if

Call conn_Nothing()

sub Myupdate(aaa)
        dim communityname
        dim communitysort
        dim communitychk
        communityname=request.form("communityname")
        communitysort=request.form("communitysort")
        if request.form("communitychk")="on" then
               communitychk=true
        else
               communitychk=false
        end if

        dim sql
        sql="update community set CommunityName='"&communityname&"', CommunitySort='"&communitysort&"', CommunityHidden="&communitychk&" where id="&aaa
        conn.execute(sql)
        Call infoDivShow(" ɹ޸ϣ")
        Response.write"<META HTTP-EQUIV='Refresh' content='3; URL=community_manage.asp'>"
        Response.end
end sub 
%>

